package com.wfw.client.controller;

import com.wfw.client.service.HystrixService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by yuzhongbo on 2018/9/14.
 */
@EnableAutoConfiguration
@RestController
public class HystrixController {
    @Autowired
    private HystrixService hystrixService;

    @GetMapping("/testhystrix")
    public String testhystrix(@RequestParam(required = false,defaultValue = "cralor") String name){
        return hystrixService.hystrix(name);
    }
}
